$(function () {
    $("#next").click(function () {
        var page = parseInt($("#currentpage").html());
        var sumpages = parseInt($("#sumpages").html());
        if (page != sumpages) {
            page++;
            location.href = "/teacher?method=find&page=" + page;
        } else {
            return;
        }
    })
    $("#pre").click(function () {
        var page = parseInt($("#currentpage").html());
        var sumpages = parseInt($("#sumpages").html());
        if (page != 1) {
            page--;
            location.href = "/teacher?method=find&page=" + page;
        } else {
            return;
        }
    })
    $("#first").click(function () {
        location.href = "/teacher?method=find&page=1";
    })
    $("#last").click(function () {
        var sumpages = parseInt($("#sumpages").html());
        location.href = "/teacher?method=find&page=" + sumpages;
    })

})